package com.db.logging;

/**
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */
public enum LogLevel {
    TRACE("TRACE"),
    DEBUG("DEBUG"),
    INFO("INFO"),
    WARN("WARN"),
    ERROR("ERROR");

    private String level;

    private LogLevel(final String level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return level;
    }

    public boolean contains(LogLevel that) {
        return this.ordinal() <= that.ordinal();
    }
}
